<% include header %>
<div class="container">
  <h3 id="title">全部日记</h3>
  <hr style="width: 90%;"/>
  <% posts.map(function (post, index) { %>
  <div class="userimg col-md-4">
    <a href="/u/<%= post.name %>"><img class="imgs" src="images/<%= post.name %>.jpg" onerror="this.src='images/timg.jpg'"/></a>
  </div>
  <div class="infos col-md-8">
    <h3 style="display: inline-block;"><a href="/u/<%= post.name %>/<%= post.time.minute %>/<%= post.title %>"><%= post.name %>的日记</a></h3>
    [<a href="/u/<%= post.name %>/<%= post.time.minute %>/<%= post.title %>"><%= post.title %></a>] |
    [<% post.tags.forEach(function (tag, index) { %>
    <% if (tag) { %>
    <a class="tag" href="/tags/<%= tag %>"><%= tag %></a>
    <% } %>
    <% }) %>]
    <p><%- post.post %></p>
    <p class="infos"><%= post.time.minute %> | 阅读：<%= post.pv %> | 评论：<%= post.comments.length %></p>
  </div>
  <hr style="width: 90%;"/>
  <% }) %>
</div>
<%- include padding %>
<% include footer %>